package com.cloud.drore.eboss.supplier.mapper;

import com.cloud.drore.eboos.common.base.MyMapper;
import com.cloud.drore.eboss.supplier.entity.ProductRejectInfo;
import com.cloud.drore.eboss.supplier.entity.vo.ProductRejectInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/3/9 10:55 <br>
 * @Author: <a href="575842778@qq.com">郑永涛</a>
 */
public interface ProductRejectInfoMapper extends MyMapper<ProductRejectInfo> {

    @Select("SELECT rejectInfo.reject_reason,rejectInfo.reject_user_id  FROM eboos_product_reject_info rejectInfo " +
            " WHERE rejectInfo.is_deleted ='0' AND rejectInfo.common_product_id = ${productId}  ORDER BY reject_time DESC LIMIT 1")
    ProductRejectInfoVo selectRejectInfoByCommonId(@Param("productId") Long commonId);

}
